import Vue from 'vue'
import App from './App'
import router from './router'
import VueQuillEditor from 'vue-quill-editor'
import ElementUI from 'element-ui';
import store from './store'
import 'element-ui/lib/theme-chalk/index.css';
//导入全局样式表
import '@/assets/css/global.css'
import '@/assets/js/global.js'
import utils from'@/assets/js/utils.js'
import api from '@/router/api' // 导入api接口
import VueCookies from 'vue-cookies'
import 'quill/dist/quill.core.css' // import styles
import 'quill/dist/quill.snow.css' // for snow theme
import 'quill/dist/quill.bubble.css' // for bubble theme
import htmlToPdf from "../src/customJavaScript/htmlToPdf"

Vue.use(VueCookies)
Vue.use(ElementUI);
Vue.use(htmlToPdf)

Vue.directive('focus', {
  inserted (el, binding, vnode) {
    // 聚焦元素
    el.querySelector('input').focus()
  }
})
Vue.config.productionTip = false
Vue.prototype.$api = api; // 将api挂载到vue的原型上
Vue.use(VueQuillEditor, /* { default global options } */)
Vue.use(utils) //引入全局方法
/* eslint-disable no-new */
new Vue({
  el: '#app',
  store,
  router,
  components: { App },
  template: '<App/>',
  render: h => h(App)
})
